﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/CompanyCenter.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%:SiteResource.Title() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<link rel="Stylesheet" type="text/css" href="/Scripts/uploadify/uploadify.css" />
<script type="text/javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="/Scripts/uploadify/jquery.uploadify.v2.1.4.js"></script>
<script type="text/javascript" src="/Scripts/uploadify/swfobject.js"></script>
<script type="text/javascript">
    $(function () {
        $("#uploadify").uploadify({
            'uploader': '/Scripts/uploadify/uploadify.swf',
            'script': '/companycenter/UpdateCoporationLogo',
            'cancelImg': '/Scripts/uploadify/cancel.png',
            'queueID': 'fileQueue',
            'auto': true,
            'fileDesc': '请选择jpg、png图片',
            'fileExt': '*.jpg;*.png',
            'onComplete': function (event, queueID, fileObj, response, data) {
                var code = eval('(' + response + ')');
                if (code.result == '1') {
                    $('#currentphoto').attr('src', code.svepath);
                }
                else {
                    alert(code.err);
                }
            },
            'multi': false,
            'sizeLimit': 819200
        });
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <div class="usercenter-main">
        <div class="usercenter-main-topbg">
        </div>
        <div class="usercenter-main-content">
            <div class="hline">
            </div>
            <div class="usercenter-index">
                <div class="usercenter-userpic">
                    <%var member = new UserService(HttpContext.Current.User.Identity.Name).GetUser();
                      if (!String.IsNullOrEmpty(member.Image))
                      { %>
                      <img id="currentphoto" src="<%:member.Image %>" style="width:150px;height:170px" />
                      
                      <%}
                      else
                      { %>
                            <img id="currentphoto" src="/content/images/no-photo-80.png" style="width:150px;height:170px" />
                     <%} %>
                    <div style="padding-top:5px;">
                        <input type="file" style="width:80px;" name="uploadify" id="uploadify" title="点击选择要上传的照片" />
                    <div id="fileQueue" style="display:none;"></div>  
                    </div>
                </div>
                <div class="content-line-vspace">
                </div>
                <div class="content-line-left" style="width:550px;height:180px; overflow:hidden;">
                    <div style="font-size:25px;font-weight:bold;color:#A10000; border-bottom:2px solid #ccc;"><%:new FirmService(HttpContext.Current.User.Identity.Name).GetCorporation().CompanyName %></div>
                    <div style="text-indent:20px; line-height:20px; padding-top:10px;"><%=new FirmService(HttpContext.Current.User.Identity.Name).GetCorporation().About %></div>
                </div>
            </div>
        </div>
        <div class="usercenter-main-bottombg">
        </div>
    </div>
</asp:Content>